﻿using System;
using System.Windows.Forms;

namespace LevelEditor
{
    public partial class EventPropertiesDialog : Form
    {
		public EventPropertiesDialog(int spawnCount)
        {
            InitializeComponent();
			SpawnCount = spawnCount;
			txtBoxSpawnCount.Text = spawnCount.ToString();
        }

        public int SpawnCount { get; set; }

        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
				SpawnCount = (int)Convert.ToUInt32(txtBoxSpawnCount.Text);
				DialogResult = DialogResult.OK;
            }
            catch
            {
                MessageBox.Show("يرجى إدخال رقم صحيح لمقدار البث...", "خطأ تحديد عدد", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
    }
}
